{extend name='public/base' /}

{block name="breadcrumb"}
{$crumbs}
{/block}

{block name="body"}
<div class="col-lg-12">
    <div class="ibox float-e-margins">
        <div class="ibox-content">
            <button class="btn btn-primary btn-xs"><a href="{:url('save_news')}"><i class="fa fa-plus"></i> 添加新闻</a> </button>
            <table class="table">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>图片</th>
                    <th>名称</th>
                    <th>分类</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {volist name="news" id="vo"}
                <tr>
                    <td>{$vo.id}</td>
                    <td>
                        <a class="element" href="javascript:;" data-html="true" data-content="<img src='/uploads/news/{$vo.image|default=''}' />" data-toggle="popover" data-trigger="click">
                            <img style="max-width: 30px; max-height: 30px;" src="/uploads/news/{$vo.image|default=''}" />
                        </a>
                    </td>
                    <td>{$vo.name}</td>
                    <td>{$vo.cate_id|get_news_category}</td>
                    <td>
                        <button class="btn btn-info btn-xs"><a href="{:url('save_news', ['id' => $vo['id']])}"><i class="fa fa-edit"></i> 编辑</a> </button>
                        <button class="btn btn-danger btn-xs" data-kefu-id="{$vo.id}"><a href="javascript:;"><i class="fa fa-trash"></i> 删除</a> </button>
                    </td>
                </tr>
                {/volist}
                </tbody>
            </table>
        </div>
    </div>
</div>
{/block}

{block name="javascript"}
{/block}